class Person{
    public name = "SunWuKong"
    private age = 30
    protected sex = "male"
}

const person = new Person()
console.log(person.name)
// console.log(person.age) // 错误 只能在Person这个类中进行访问
// console.log(person.sex)  // 错误 只能在Person这个类和其子类中访问